<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Dashboard extends CI_Controller {
	public $userInfo;
	public function _load()
	{
		$this->load->model('User_model');
		$this->load->library('user_verification');
	}
	function __construct()
	{
		parent::__construct();
		$this->_load();
		$is_login = $this->user_verification->is_login();
		if($is_login == 0)
		{
			redirect('sign/login', 'location', 303);
		}
		$userInfo = $this->User_model->getForId($this->input->cookie('user_id', TRUE));
		$this->userInfo = $userInfo[0];
	}
	public function index()
	{
		$data['userInfo'] = $this->userInfo;
		$this->load->view('member/public/head',$data);
		$this->load->view('member/public/left');
		$this->load->view('member/dashboard/dashboard');
		$this->load->view('member/public/foot');
	}
	public function statistic()
	{
		$data['userInfo'] = $this->userInfo;
		$this->load->view('member/public/head',$data);
		$this->load->view('member/public/left');
		$this->load->view('member/dashboard/statistic');
	}
}